Inversion Counting